Custom LinkedList Implementation in Java